<!DOCTYPE html>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css">
<title>Captive</title>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>


<script>

	var init = 5;
	
	$(document).ready(
		function() {
			document.getElementById("dialog").style.display="inherit";
			document.getElementById("background").style.display="inherit";
			document.getElementById("dialog").innerHTML = "(I wake up and find myself at an unknown place. Jimmy is kneeling next to me.)";
			$("#dialog").click(dialog1);
		}
	);
	
	function dialog1()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>Dad....can you hear me....?";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2);
		}
	}
	
	function dialog2()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "(My head hurts. I feel a bump on my head.)";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2_1);
		}
	}
	
	function dialog2_1()
	{
		$("#dialog").unbind('click');
		document.getElementById("dialog").innerHTML = "I say: <br/>Where are we....?";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2_2);
		}
	}
	
	function dialog2_2()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>We're at Stephen's house. We are locked in this room from outside. You scared me, Dad. When Stephen brought you here....I thought you weren't going to wake up...";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2_3);
		}
	}
	
	function dialog2_3()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>Are you alright, Jimmy? Did you get hurt?";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2_4);
		}
	}
	
	function dialog2_4()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>I'm fine, Dad. Stephen didn't hurt me.";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2_5);
		}
	}
	
	function dialog2_5()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/>Do you know Stephen?";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2_6);
		}
	}
	
	function dialog2_6()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/child.png";
		document.getElementById("dialog").innerHTML = "Jimmy says: <br/>Yeah...I do. I met him when I went to a baseball game with my friends a couple years ago...Sorry, Dad! I didn't know he would act like this...<br/>I can fix this!";
		setTimeout(bind_click, 1000);
		function bind_click(){
			$("#dialog").click(dialog2_7);
		}
	}
	
	function dialog2_7()
	{
		$("#dialog").unbind('click');
		document.getElementById("peopleimage").src="images/blank.png";
		document.getElementById("dialog").innerHTML = "I say: <br/><div onclick=\"dialog3()\">1. Where's Stephen? Let me talk to him...</div><div onclick=\"dialog4()\">2. What do you think we should do now?</div><div onclick=\"dialog5()\">3. I will find a way to get us out of here.</div>";
	}
	
	function dialog3()
	{
			window.location = "scene4-1.php";
	}
	
	function dialog4()
	{
			window.location = "scene4-2.php";
	}
	
	function dialog5()
	{
			window.location = "scene4-3.php";
	}
	
	
</script>



</head>

<body>


<div id="container">
	<div id="background"><img src="images/basement.jpg" /></div>
	<div id="dialog">
	</div>
	<div id="people"><img id="peopleimage" src=""></div>
</div>

<audio id="audiotag1" src="audios/hit.mp3" preload="auto"></audio>



</body>
</html>